import request from '@/utils/request.js'
//课程分类列表
export const subjectCategoryListService = () => {
  return request.get('/categories')
}

//选修课程添加
export const subjectCategoryAddService = categoryData => {
  return request.post('/categories', categoryData)
}

//课程修改
export const subjectCategoryUpdateService = categoryData => {
  return request.put('/categories', categoryData)
}

//课程删除
export const subjectCategoryDeleteService = id => {
  return request.delete(`/categories/${id}`)
}

//作业列表
export const subjectHomeworkListService = params => {
  return request.get('/subjects', { params: params })
}
//作业添加
export const subjectHomeworkAddService = homeworkData => {
  return request.post('/subjects', homeworkData)
}

//作业修改
export const subjectHomeworkUpdateService = homeworkData => {
  return request.put('/subjects', homeworkData)
}

//作业删除
export const subjectHomeworkDeleteService = id => {
  return request.delete(`/subjects/${id}`)
}

//作业导出
export const subjectHomeworkExportService = params => {
  return request.get('/subjects/exportExcel', { params: params })
}
